
/**
 *
 */
package com.serviceprovider.business.module.admin.transaction.services.dao.interfaces;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.admin.transaction.model.NewCsvReplica;
import com.serviceprovider.business.module.admin.transaction.model.TransactionTarget;
import com.serviceprovider.business.module.admin.transaction.valueobjects.TransactionCSVHistory;

//~--- JDK imports ------------------------------------------------------------

import java.io.UnsupportedEncodingException;

import java.util.List;

/**
 * @author mrduongnv@gmail.com
 *
 */
public interface ITransactionDataService {
    boolean isDuplicatedRecord(String receiverName, String uniqueDbField);

    void loadTransactionRecord(List<String> sqlList, List<String> updateList);

    /**
     * Load transaction data from table.
     *
     * @param dataList
     *            the data list
     */
    void loadTransactionDataFromTable();

    /**
     * Insert transaction history.
     *
     * @param csvHistory
     *            the csv history
     */
    void insertTransactionHistory(TransactionCSVHistory csvHistory);

    /**
     * Mark as processed transaction history.
     *
     * @param csvHistoryId
     *            the csv history id
     */
    void markAsProcessedTransactionHistory(Integer csvHistoryId);

    /**
     * Retrieve transaction csv history records.
     *
     * @param username
     *            the username
     * @return the list
     * @throws UnsupportedEncodingException
     *             the unsupported encoding exception
     */
    List<TransactionCSVHistory> retrieveTransactionCsvHistoryRecords(String username)
            throws UnsupportedEncodingException;

    /**
     * Retrieve transaction csv history.
     *
     * @param destination
     *            the destination
     * @return the transaction csv history
     * @throws UnsupportedEncodingException
     *             the unsupported encoding exception
     */
    TransactionCSVHistory retrieveTransactionCsvHistory(String destination) throws UnsupportedEncodingException;

    List<String> getAllNonMatchingUserIds(List<NewCsvReplica> results);

    List<TransactionTarget> retrieveTransformedData();

    void insertTransactionDetails(List<TransactionTarget> targetDate);
}



